import requests from '@/utils/request.js'

// 客户列表
export function getUserList(query) {
    return requests({
        url: '/system/admin/user/getUserList',
        method: 'get',
        params: query
    })
}

// 删除客户
export function deleteUser(userId) {
    return requests({
        url: '/system/admin/user/deleteUser/' + userId,
        method: 'delete'
    })
}

export function login(userCard, password) {
	return requests({
		url: '/auth/admin/login',
		headers: {
			isToken: false
		},
		method: 'post',
		data: {
			userCard,
			password
		}
	})
}

export function getUserInfo() {
	return requests({
		url: '/system/user/getUser',
		method: 'get'
	})
}

export function logout() {
	return requests({
		url: '/auth/logout',
		method: 'delete'
	})
}